<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="/resource/js/jquery-3.2.1.js"></script>
</head>
<body>
	<a href="insert">新增</a>
	<form action="list" method="post" id="fm">
		<input type="hidden" name="pageNum" value="${info.pageNum }" id="pageNum">
		订单编号<input type="text" name="id" value="${order.id }">
		订单时间<input type="date" name="orderDate" value="<fmt:formatDate value="${order.orderDate }" pattern="yyyy-MM-dd"/>" >
		至<input type="date" name="endorderDate"  value="<fmt:formatDate value="${order.endorderDate }" pattern="yyyy-MM-dd"/>">
		<input type="submit" value="查询">
	</form>
	<table>
		<tr>
			<td>订单编号</td>
			<td>订单时间</td>
			<td>订货人</td>
			<td>金额</td>
			<td>制单人</td>
			<td>交货方式</td>
			<td>交货地点</td>
			<td>操作</td>
		</tr>
		<c:forEach items="${info.list }" var="li">
			<tr>
				<td>${li.id }</td>
				<td><fmt:formatDate value="${li.orderDate }" pattern="yyyy-MM-dd"/></td>
				<td>${li.name }</td>
				<td>${li.price }</td>
				<td>${li.prepared }</td>
				<td>${li.type }</td>
				<td>${li.add }</td>
				<td>${li.add }</td>
			</tr>
		</c:forEach>
	</table>
	<jsp:include page="/WEB-INF/view/page.jsp"></jsp:include>
	<script type="text/javascript">
	
		function goPage(pageNum){
			$("#pageNum").val(pageNum);
			$("#fm").submit();
		}
	</script>
</body>
</html>